<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:t="http://myfaces.apache.org/tomahawk">

<ui:composition template="/layouts/CrudPesquisar.xhtml">
	<ui:param name="bean" value="#{ManageEmpresa}" />

	<ui:define name="breadcrumb_content">
		<h:outputLink value="/cpp-web/pages/cadastros.jsf" title="Cadastros">Cadastros</h:outputLink>
			<h:outputText> » </h:outputText>
		<h:outputLink value="#" title="Listagem de Empresas" styleClass="active">Listagem de Empresas</h:outputLink>
	</ui:define>
		
	<ui:define name="quick_links">
		<ui:include src="/layouts/cadastros_links.xhtml" />
	</ui:define>
			
	<ui:define name="OUTRAS_ACOES">
	</ui:define>

	<ui:define name="PESQUISA">
			<h:form id="formPesquisar">
				<fieldset id="dadosPesquisa">
					<div class="legenda"><span></span></div>
					<ul>
						<li> 
							<h:outputLabel value="Nome: " for="nome" />
							<h:inputText value="#{bean.nome}" id="nome" />
						</li>
						<li>
							<h:commandButton action="#{bean.filtrar}" value="Buscar Empresa" styleClass="btForm" />
						</li>
					</ul>
				</fieldset>
			</h:form>
	</ui:define>
	
	<ui:define name="COLUNAS">
		<h:column>
			<f:facet name="header">
				<h:outputText value="Nome" />
			</f:facet>
			<h:outputText value="#{item.nome}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Nome Fantasia" />
			</f:facet>
			<h:outputText value="#{item.nomeFantasia}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Telefone" />
			</f:facet>
			<h:outputText value="#{item.telefone}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Responsável" />
			</f:facet>
			<h:outputText value="#{item.nomeResponsavel}" />
		</h:column>
	</ui:define>
	
	<ui:define name="COLUNA_ACOES_DIREITA">
	</ui:define>	
	</ui:composition>

</html>
